<?php
namespace app\aliyun\controller;

use tp5_lib\aliyun\utility\Sms;
use tp5_lib\common\controller\TestBaseController;

/**
 * 短信测试类
 */
class TestController extends TestBaseController
{
    public function index()
    {
        return $this->fetch();
    }
    public function sendVerifyCode()
    {
        $mobile=input("mobile");
        $code=input("code");
        if(!Sms::instance()->sendVerifyCode($mobile,$code)){
            $this->error(Sms::instance()->getError());
        }
        $this->success();
    }
}
